import { PeerServer } from "peer";

const port = parseInt(process.env.PORT ?? "4500");
PeerServer({
  port,
  path: "/test",
}, (server) => {
  server.on('connection', (socket) => {
    socket.write('test\n')
  })
}).listen(() => {
  console.log(`Server started at ${port}.`);
});
